/**
 *
 */
package org.suren.littlebird.actions.bundle;

import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.swt.widgets.Table;
import org.suren.littlebird.Activator;
import org.suren.littlebird.actions.Reload;

/**
 * @author suren
 *
 */
public class SuRenBundleUpdateAction extends AbstractSuRenBundleSyncAction
{
	private Table table;
	private SuRenBundleController controller;
	private Reload bundleReload;

	/**
	 * @param table
	 * @param bundleReload
	 */
	public SuRenBundleUpdateAction(Table table, Reload bundleReload)
	{
		this.table = table;
		this.controller = new DefaultSuRenBundleController();
		this.bundleReload = bundleReload;
	}

	@Override
	public String getText()
	{
		return "Update";
	}

	@Override
	public ImageDescriptor getImageDescriptor()
	{
		return Activator.getImageDescriptor("icons/update.gif");
	}

	@Override
	public void run()
	{
		control(table, controller, bundleReload, SuRenBundleController.UPDATE);
	}
}
